function ma = sma(rawdata,n)

ma = zeros(size(rawdata));

ma(1:n,:) = mean(rawdata(1:n,:));

for i = n+1:size(rawdata,1)
    ma(i,:) = mean(rawdata(i-n:i,:));
end

return

